from concurrent.futures import ThreadPoolExecutor

from flasgger import Swagger
from flask_apscheduler import APScheduler

from app.environment import Env
from app.mod_base.cache import Cache

swagger = Swagger()
scheduler = APScheduler()
env = Env()
cache = Cache({'cache_type': 'MemCache', 'threshold': 5000})
global_executor = ThreadPoolExecutor(max_workers=env.cfg.get('THREAD_POOL_SIZE', 3))
